import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {StoreModule} from '@ngrx/store';
import {StoreDevtoolsModule} from '@ngrx/store-devtools';

import {environment} from '../../environments/environment';

import {playerReducer} from './reducers/player.reducer';
import {memberReducer} from './reducers/member.reducer';

@NgModule({
  declarations: [],
  imports: [
    CommonModule,
    StoreModule.forRoot(
      {
        player: playerReducer,
        member: memberReducer
      },
      {
        runtimeChecks: {
          strictStateImmutability: true,
          strictStateSerializability: true,
          strictActionImmutability: true,
          strictActionSerializability: true
        }
      }
    ),
    StoreDevtoolsModule.instrument({maxAge: 25, logOnly: environment.production})
  ]
})
export class AppStoreModule {
}
